import All from './city-picker.min'

let provinceList = []
let cityMap = {}

All.forEach(one => {
  provinceList.push(one.name)
  cityMap[one.name] = one.sub.map(c => c.name)
})

export const getProvinceList = () => {
  return provinceList
}
export const getCity = provinceName => {
  return cityMap[provinceName] || []
}
